//  @ Project : GagalPanen
//  @ File Name : seed.cpp
//  @ Date : 3/9/2011
//  @ Author : Irvan
//
//


#include "seed.hpp"
#include "seedconstants.hpp"

Seed::Seed(GameInterface* game, int seed_id) :
    Item(game), seed_id_(seed_id) {
}

Seed::Seed(GameInterface* game, std::ifstream& is) :
    Item(game), seed_id_(0) {
  is >> seed_id_;
}

void Seed::save(std::ofstream& os) {
  Item::save(os);
  os << seed_id_ << std::endl;
}

Seed::~Seed() {}

int Seed::getId() {
  return seed_id_;
}

ItemType Seed::getType() {
  return kSeed;
}

bool Seed::isSeed() {
  return true;
}

std::string Seed::getName() {
  return SeedConstants::getSeedName(getId());
}

int Seed::getPrice() {
  return SeedConstants::getSeedSellPrice(getId());
}

int Seed::getPlantId(){
  return SeedConstants::getPlantIdFromSeed(getId());
}

std::string Seed::getDescription() {
  return SeedConstants::getSeedDescription(getId());
}

